var arr = [1, 2, 3]

// console.log(arr.length) //3
// console.log(arr) //[1,2,3]

// arr.length = arr.length - 2

// console.log(arr.length) //2
// console.log(arr) //[1,2]

arr[0] = 123

console.log(arr)
console.log(arr.length)